<div class="tp_page_title">
	<div class="container">
		<div class="row">
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div class="tp_page_heading">
					<h3><?php echo $headlineText;?></h3>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="tp_gray_wrapper tp_toppadder80 tp_bottompadder80">
	<div class="container">
		<div class="row">
			<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
				<div class="row">
					<?php
			foreach($productdetails as $soloFet){
			   $prodName = $this->ts_functions->getProductName($soloFet['prod_id']);
			   $prodImage = $this->ts_functions->getProductPic($soloFet['prod_image']);
			   $prodUrl   = base_url().'item/'. $prodName.$soloFet['prod_uniqid'];
        	   
               $catename = strtolower($soloFet['cate_urlname']);
               $catename = str_replace(' ','-',$catename);
               $catename = preg_replace('!-+!', '-', $catename);
			   $cat_url  =base_url().'home/products/'. $catename;
               $prod_demourl='';
               if($soloFet['prod_demourl']){
				$prod_demourl= base_url().'item/'.$prodName.'live_demo/'.$soloFet['prod_uniqid']; 
			   }
               
			   if( $soloFet['prod_free'] == '0') {
				  $prod_price=$this->ts_functions->getsettings('portalcurreny','symbol').' '.$soloFet['prod_price']; 
			   }else{
				  $prod_price=$this->ts_functions->getlanguage('freetext','commontext','solo'); 
			   }
			   if( $this->ts_functions->getsettings('portal','revenuemodel') != 'subscription' ) {
				   $purDetail = $this->DatabaseModel->access_database('ts_purchaserecord','select','',array('purrec_prodid'=>$soloFet['prod_id']));
				   $prod_sale=count($purDetail);
			   }else{
				  $prod_sale=$soloFet['prod_download_count']; 
			   }
			   $vendorName = $this->ts_functions->getVendorName($soloFet['prod_uid']);
			   $vendo_url=base_url().'vendor/'.$vendorName;
			   $prod_title=$soloFet['prod_name'];
			   
			   ?> 
					<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
						<div class="tp_product_div">
							<div class="tp_product_img">
								<img src="<?php echo $prodImage; ?>" class="img-responsive" alt="">
								<?php
								 if($prod_demourl!=''){?>
								  <div class="tp_overlay"></div>
									<div class="tp_overlay_btn">
										<a href="<?php echo $prod_demourl; ?>" class="tp_btn" target="_blank"><?php echo $this->ts_functions->getlanguage('livedemotab','homepage','solo');?></a>
									</div>	 
									 
								 <?php }?>
							</div>
							<div class="tp_product_data">
								<h3><a href="<?php echo $prodUrl; ?>"><?php echo $soloFet['prod_name'];  ?></a></h3>
						        <p><?php echo substr(strip_tags($soloFet['prod_description']),0,150).' ...';?></p>
								<ul>
									<li><a href="<?php echo $vendo_url;  ?>"><i class="fa fa-user"></i> <?php echo ucfirst($vendorName); ?></a></li>
									<li><a href="<?php echo $cat_url; ?>"><i class="fa fa-tag"></i><?php echo $catename; ?></a></li>
								</ul>
								<div class="tp_divider"></div>
								<div class="tp_sales_data">
									<h4><i class="fa fa-shopping-cart"></i> <?php echo $prod_sale.' ' . $this->ts_functions->getlanguage('salestext','commontext','solo'); ?> </h4>
								</div>
								<div class="tp_price_div">
									<h4><?php echo $prod_price; ?></h4>
								</div>
								<div class="tp_btndiv">
									<a href="<?php echo $prodUrl; ?>" class="tp_btn"><?php echo $this->ts_functions->getlanguage('viewbtn','homepage','solo') ?></a>
								</div>
							</div>
						</div>
					</div>
			<?php } ?>		
				</div>
			</div>
			<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
				<div class="tp_sidebar_div tp_vendor_info">
					<h3><?php echo $this->ts_functions->getlanguage('vendorinfotext','homepage','solo');?></h3>
					<ul>
						<li><label><?php echo $this->ts_functions->getlanguage('usernametext','userdashboard','solo');?></label> <?php echo $userDetail[0]['user_uname'];?></li>
						<li><label><?php echo $this->ts_functions->getlanguage('membersincetext','homepage','solo');?></label> <?php echo date_format(date_create ( $userDetail[0]['user_registerdate'] ) , 'M d, Y');?></li>
						<li><label><?php echo $this->ts_functions->getlanguage('productsnumtext','homepage','solo');?></label> <?php echo count($productdetails);?></li>
					</ul>
				</div>
				<div class="tp_sidebar_div tp_vendor_contact">
					<h3><?php echo $this->ts_functions->getlanguage('contactvendortext','homepage','solo');?></h3>
					
					<?php if(isset($this->session->userdata['ts_uid'])) { ?>
					<div class="tp_vendor_msg">
						<form>
							<div class="form-group">
								 <textarea rows="5" class="form-control" placeholder="<?php echo $this->ts_functions->getlanguage('yourmsgtext','commontext','solo'); ?>" id="vendorMessage"></textarea>
							</div>
							
							<a onclick="sendvendorcontactform(this);" data-vendor="<?php echo $userDetail[0]['user_id'];?>" class="tp_btn "><?php echo $this->ts_functions->getlanguage('sendtext','commontext','solo'); ?> <i class="fa fa-rocket" aria-hidden="true"></i></a>
						</form>
					</div>
					<?php } else { ?>
					 <p style="text-align:center;"><a href="<?php echo $basepath;?>authenticate/login"><?php echo $this->ts_functions->getlanguage('logintocontacttext','homepage','solo');?></a></p>
					<?php } ?>

				</div>
			</div>
		</div>
	</div>
</div>
<!-- Content wrapper End -->
<input type="hidden" value="<?php echo $this->ts_functions->getlanguage('empty','message','solo');?>" id="emptyerr_text">
<input type="hidden" value="<?php echo $this->ts_functions->getlanguage('contactsuc','message','solo');?>" id="contactsuc_text">
